package com.huaxin.hxmodulesystem.mapping;

import com.huaxin.hxmodulesystem.dto.request.AddRoleReqDTO;
import com.huaxin.hxmodulesystem.dto.request.UpdateRoleReqDTO;
import com.huaxin.hxmodulesystem.models.Role;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

@Mapper(componentModel = "spring")
public interface RoleMapping {

    Role toEntity(AddRoleReqDTO in);

    void updateEntity(UpdateRoleReqDTO in, @MappingTarget Role entity);
}